<?php require_once CON_PATH.'home/commom.php'?>
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
	<title></title>
</head>
<link rel="stylesheet" type="text/css" href="public/home/css/common.css">

<script type="text/javascript" src="public/home/js/jquery-3.2.1.min.js"></script>
<body>
<!-- 头部 -->
<div class="header">
	<div class="top">
		    <div class="top-content">
                    <input type="hidden" name="session_name" value="<?php echo isset($_SESSION['user']['name'])?'1':'0'; ?>">
                    <?php if(empty($_SESSION['user'])):?>
                    <h3><a href="index.php?c=reg&a=index">[ 注册 ]</a><a href="index.php?c=login&a=index">[ 登录 ]</a></h3>
                    <?php else:?>
                    
                    <h3 style="color:white;width:200px;">欢迎你，<?php echo $_SESSION['user']['name']; ?> <a style="margin-left:10px;" href="index.php?c=center&a=index">用户中心</a>|<a style="margin-left:10px;" href="index.php?c=logout&a=logout">注销</a></h3>
                    <?php endif;?>
				    <span>
                        <a>设为首页</a>
                        <a>收藏本站</a>
				    </span>
		    </div>
	</div>
	<div class="mid">
            <div class="mid-content">
                    <div class="logo fl">
                        <a href="">
                            <img src="public/home/img/wz.png">
                        </a>
                    </div>
                    <div class="serch fr">
                        <input class="text fl" type="text" name="">
                        <input class="button fl" type="submit" name="" value="搜索">
                    </div>
                    <div class="ceo"><strong>招商热线：011-677293619</strong></div>
            </div>
	</div>
	<div class="bottom">
            <div class="bottom-content">
                    <ul class="nav">
                         <li><a href="index.php?c=index&a=index">首页</a></li>
                         <?php foreach($cates as $v): ?>
                         <li class="nav-line"></li>
                              <?php if($v['cate_type']==0){$cy='cover';}
                                     elseif($v['cate_type']==1){$cy='list';} else{$cy='product';} ?>
                         <li><a href="index.php?c=<?php echo $cy;?>&a=index&cid=<?php echo $v['id']?>&pid=<?php echo $v['pid']?>"><?php echo $v['name']?></a>

                                  <div class="chch">
                                    <?php foreach($v['ch'] as $v1):?>
                                            <?php if($v1['cate_type']==0){$cy='cover';}
                                             elseif($v1['cate_type']==1){$cy='list';} else{$cy='product';} ?>
                                            <div><a href="index.php?c=<?php echo $cy;?>&a=index&cid=<?php echo $v1['id']?>&pid=<?php echo $v1['pid']?>"><?php echo $v1['name']?></a></div>
                                    <?php endforeach;?>
                                  </div>
                         </li>
                         <?php endforeach; ?>

                         <div class="clear"></div>
                    </ul>
            </div>
	</div>
</div>
<!-- 头部 -->
<?php if($mod=='home'&&$controller!=='index'):?>
<!--广告-->
<div class="lbt">
     <div class="lbt-top"></div>
     <img src="public/home/img/6.jpg">
</div>

<div class="huise"></div>
<!--广告-->
<?php endif; ?>


<!-- 中间可变区域 -->
<?php include_once($filename);?>
<!-- 中间可变区域 -->
  

<!-- 底部 -->
<div class="foot">
    <div class="foot-con">
            <div class="foot-top"><a href="#">品牌介绍</a>　|　<a href="#">产品世界</a>　|　<a href="#">新闻中心</a>　|　<a href="#">户外宝典</a>　|　<a href="#">联系我们</a></div>
            <h3>户外运动装备 版权所有 2008-2012 京ICP备8888888 站长统计</h3>
            <h3>电话：010-8348495911 QQ:88888888 moban@163.com</h3>     
    </div>

</div>


<!-- 底部 -->
</body>
</html>

<script type="text/javascript">
$(function(){
    $('.nav li').hover(
        function(){;
         $(this).find('.chch').show();
        }
        ,function(){
         $(this).find('.chch').hide();
        });
})

</script>